home *** CD-ROM | disk | FTP | other *** search
- property pHandler, pNumStates, ancestor
-
- on beginSprite me
- set ancestor to new(script "Bitmap But 1", the spriteNum of me, pNumStates)
- end
-
- on MouseUpAction me
- do(pHandler)
- end
-
- on MouseDownAction me
- nothing()
- end
-
- on MouseEnterAction me
- nothing()
- end
-
- on MouseLeaveAction me
- nothing()
- end
-
- on getPropertyDescriptionList me
- set description to [:]
- addProp(description, #pHandler, [#default: "nothing", #format: #string, #comment: "Hander to Execute on mouseDown"])
- addProp(description, #pNumStates, [#default: 3, #format: #integer, #comment: "Number of States", #range: [2, 3]])
- return description
- end
-
- on getBehaviorDescription me
- set endChar to offset("--END OF HEADER", the text of me)
- set endLine to the number of lines in char 1 to endChar of the text of me - 1
- set description to line 1 to endLine of the text of me
- repeat with whichLine = endLine down to 1
- if line whichLine of description = EMPTY then
- delete line whichLine of description
- end if
- end repeat
- delete line 1 of description
- return description
- end
-